<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%adspace}}".
 *
 * @property integer $id
 * @property integer $ad_network_id
 * @property string $media_id
 * @property string $format_list
 * @property string $ad_network_adspace_id
 * @property integer $category_id
 * @property string $name
 * @property string $base_price
 * @property integer $deal_id
 * @property integer $width
 * @property integer $height
 * @property integer $position
 * @property integer $ad_form
 * @property string $page_url
 * @property integer $cpe_support
 * @property string $cpe_format_list
 * @property integer $cpe_mode
 * @property integer $cpe_width
 * @property integer $cpe_height
 * @property integer $cpe_duration
 * @property string $cpe_base_price
 * @property string $code
 * @property integer $status
 * @property string $last_update
 */
class Adspace extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%adspace}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['ad_network_id', 'format_list', 'category_id', 'base_price', 'width', 'height', 'cpe_width', 'cpe_height'], 'required'],
            [['ad_network_id', 'category_id', 'deal_id', 'width', 'height', 'position', 'ad_form', 'cpe_support', 'cpe_mode', 'cpe_width', 'cpe_height', 'cpe_duration', 'status'], 'integer'],
            [['cpe_base_price'], 'number'],
            [['code'], 'string'],
            [['last_update'], 'safe'],
            [['media_id', 'ad_network_adspace_id', 'name'], 'string', 'max' => 64],
            [['format_list'], 'string', 'max' => 20],
            [['base_price', 'cpe_format_list'], 'string', 'max' => 32],
            [['page_url'], 'string', 'max' => 1024]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ad_network_id' => 'Ad Network ID',
            'media_id' => 'Media ID',
            'format_list' => 'Format List',
            'ad_network_adspace_id' => 'Ad Network Adspace ID',
            'category_id' => 'Category ID',
            'name' => 'Name',
            'base_price' => 'Base Price',
            'deal_id' => 'Deal ID',
            'width' => 'Width',
            'height' => 'Height',
            'position' => 'Position',
            'ad_form' => 'Ad Form',
            'page_url' => 'Page Url',
            'cpe_support' => 'Cpe Support',
            'cpe_format_list' => 'Cpe Format List',
            'cpe_mode' => 'Cpe Mode',
            'cpe_width' => 'Cpe Width',
            'cpe_height' => 'Cpe Height',
            'cpe_duration' => 'Cpe Duration',
            'cpe_base_price' => 'Cpe Base Price',
            'code' => 'Code',
            'status' => 'Status',
            'last_update' => 'Last Update',
        ];
    }
}
